import Vue from 'vue'
import Router from 'vue-router'

import HomeView from '@/views/HomeView'
import CattleView from '@/views/CattleView'
import AccountView from '@/views/AccountView'
import UserView from '@/views/UserView'

import FollowStrategyView from '@/views/Follow-StrategyView'
import FollowCattleView from '@/views/Follow-CattleView'

import LoginView from '@/views/LoginView'
import RegisterView from '@/views/RegisterView'
import StrategyDetailView from '@/views/StrategyDetailView'
import CattleDetailView from '@/views/CattleDetailView'
import MyInfoView from '@/views/MyInfoView'
import MyMailboxView from '@/views/MyMailboxView'
import SysNoticeView from '@/views/SysNoticeView'
import SupplierView from '@/views/SupplierView'
import BigDataView from '@/views/BigDataView'
import AboutView from '@/views/AboutView'
import CompanyView from '@/views/CompanyView'
import PlatformView from '@/views/PlatformView'
import HelpView from '@/views/HelpView'
import SetView from '@/views/SetView'
import EnterView from '@/views/EnterView'
import EnterChooseView from '@/views/EnterChooseView'
import EnterOpenView from '@/views/EnterOpenView'
import CheckInView from '@/views/CheckInView'
import SetMarketView from '@/views/SetMarketView'
import SetStrategyView from '@/views/SetStrategyView'
import FollowAccountView from '@/views/FollowAccountView'

Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/',
        redirect: '/home'
    },{
        path: '/home',
        component: HomeView
    },{
        path: '/strategy-detail/:id',
        component: StrategyDetailView
    },{
        path: '/follow-strategy/:id/:name',
        component: FollowStrategyView,
        meta: {
            requiresAuth: true
        }
    },{
        path: '/cattle',
        component:  CattleView
    },{
        path: '/cattle-detail/:id',
        component: CattleDetailView
    },{
        path: '/follow-cattle/:id/:name',
        component: FollowCattleView,
        meta: {
            requiresAuth: true
        }
    },{
        path: '/account',
        component: AccountView,
        meta: {
            requiresAuth: true
        }
    },{
        path: '/user',
        component: UserView
    },{
        path: '/login',
        component:  LoginView
    },{
        path: '/register',
        component:  RegisterView
    },{
        path: '/myinfo',
        component:  MyInfoView
    },{
        path: '/mymailbox',
        component:  MyMailboxView
    },{
        path: '/sysnotice',
        component:  SysNoticeView
    },{
        path: '/supplier',
        component:  SupplierView
    },{
        path: '/bigdata',
        component:  BigDataView
    },{
        path: '/about',
        component:  AboutView
    },{
        path: '/company',
        component:  CompanyView
    },{
        path: '/platform',
        component:  PlatformView
    },{
        path: '/help',
        component:  HelpView
    },{
        path: '/set',
        component:  SetView
    },{
        path: '/enter',
        component:  EnterView
    },{
        path: '/enter-choose',
        component:  EnterChooseView
    },{
        path: '/enter-open/:id',
        component:  EnterOpenView
    },{
        path: '/check-in',
        component:  CheckInView
    },{
        path: '/set-strategy',
        component:  SetStrategyView
    },{
        path: '/set-market',
        component:  SetMarketView
    },{
        path: '/follow-account',
        component:  FollowAccountView
    }

  ]
})
